start = 1
sum = 1

for side in xrange(3, 1003, 2):
    inc = side - 1
    sum += 4 * start + 10 * inc
    start += 4 * inc
    
print sum